<form action="index.php" method="post" name="adminForm">
  <table class="adminlist">
    <thead>
      <tr>
        <th width="20">
          <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->players); ?>);" />
        </th>
        <th class="title"><?= JHTML::_( 'grid.sort', 'Name', 'name', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="15%"><?= JHTML::_( 'grid.sort', 'Team', 'team', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="7%"><?= JHTML::_( 'grid.sort', 'Jersey no.', 'jersey_number', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="15%"><?= JHTML::_( 'grid.sort', 'Position', 'position', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="10%"><?= JHTML::_( 'grid.sort', 'Date Start', 'date_start', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="10%"><?= JHTML::_( 'grid.sort', 'Date End', 'date_end', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%">Published</th>
      </tr>
    </thead>  
    <?php
      jimport('joomla.filter.output');
      $n = count($this->players);      
      for ($i=0; $i < $n; $i++)
      {
        $player = &$this->players[$i];
        $checked = JHTML::_('grid.id', $i, $player->id);
        $published = JHTML::_('grid.published', $player, $i);
        $link = 'index.php?option=' . $option . '&task=edit&c=player&cid[]='. $player->id;
        
    ?>
      <tr>
        <td>
          <?= $checked; ?>
        </td>
        <td>
          <a href="<?= $link; ?>"><?= $player->name; ?></a>
        </td>      
        <td>
          <?= $player->team ?>
        </td>
        <td>
          <?= $player->jersey_number ?>
        </td>
        <td>
          <?= $player->position ?>
        </td>        
        <td>
          <?= $player->date_start ?>
        </td>
        <td>
          <?= $player->date_end ?>
        </td>
        <td>
          <?= $published ?>
        </td>
      </tr>
    <?php
      }
    ?>
    <tr>
      <td colspan="8"><?= $this->pagination->getListFooter(); ?></td>
    </tr>
  </table>
  <input type="hidden" name="option" value="<?php echo JRequest::getVar( 'option' );?>"/>
  <input type="hidden" name="c" value="<?php echo JRequest::getVar('c', 'season'); ?>" />
    <input type="hidden" name="task" value=""/>
    <input type="hidden" name="boxchecked" value="0"/>      
  <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
  <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>